export default [
  {
    url: '/mock/admin/login',
    method: 'post',
    response: ({ body }: { body: LoginBody }): Resp<UserLoginInfo> => {
      return {
        code: 200,
        message: '登录成功',
        data: {
          admin: {
            id: 1,
            username: body.username,
            password: 'there is nothing',
          },
          token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNjkwMTI0NTY2LCJleHAiOjE2OTAxMzE3NjZ9.kC_3Pf9M7EDfZCOE51piN8SHX4CpUydVnkC2lqCwIlE1QzABc67TGKjcGJQzy-sw6QZ2eVWN0l7iRdiJSOkAJg',
        },
      }
    },
  },
  {
    url: '/mock/admin/logout',
    method: 'get',
    response: {
      code: 200,
      message: '登出成功',
      data: null,
    },
  },
  {
    url: '/mock/admin/updatePwd',
    method: 'post',
    response: {
      code: 200,
      message: '密码修改成功',
      data: null,
    },
  },
  {
    url: '/mock/admin',
    method: 'post',
    response: {
      code: 200,
      message: '添加成功',
      data: null,
    },
  },
  {
    url: '/mock/admin',
    method: 'put',
    response: {
      code: 200,
      message: '修改成功',
      data: null,
    },
  },
  {
    url: '/mock/admin/:id',
    method: 'delete',
    response: {
      code: 200,
      message: '删除成功',
      data: null,
    },
  },
  {
    url: '/mock/adminList',
    method: 'post',
    response: {
      code: 200,
      message: 'success',
      data: {
        total: 2,
        list: [
          {
            id: 2,
            username: '李四',
            password: '$2a$10$ZhfMZ6NO//HI3p0TVTOHreTRjbsEMkf84hlNd6lC.alCsNrHC/MxK',
          },
          {
            id: 1,
            username: 'admin',
            password: '$2a$10$FsH4SFOV2wLEHXGLLwNaYeYUMUylt0kgN87E8L4551mHmV2RSlvyC',
          },
        ],
        pageNum: 1,
        pageSize: 10,
        size: 2,
        startRow: 1,
        endRow: 2,
        pages: 1,
        prePage: 0,
        nextPage: 0,
        isFirstPage: true,
        isLastPage: true,
        hasPreviousPage: false,
        hasNextPage: false,
        navigatePages: 8,
        navigatepageNums: [
          1,
        ],
        navigateFirstPage: 1,
        navigateLastPage: 1,
      },
    },
  },
]
